package com.tiecode.lombok;

import com.tiecode.lombok.annotation.CleanUpProcessor;
import com.tiecode.lombok.annotation.CustomComponentProcessor;
import com.tiecode.lombok.annotation.DataClassProcessor;
import com.tiecode.lombok.annotation.ForceDependencyProcessor;
import com.tiecode.lombok.annotation.GenerateCreateProcessor;
import com.tiecode.lombok.annotation.HashObjectProcessor;
import com.tiecode.lombok.annotation.ParameterNameProcessor;
import com.tiecode.lombok.annotation.SerializeClassProcessor;
import com.tiecode.lombok.annotation.SingleInstanceProcessor;
import com.tiecode.lombok.annotation.ToMainPkgProcessor;
import com.tiecode.platform.compiler.api.process.TaskEvent;
import com.tiecode.platform.compiler.toolchain.env.Context;
import com.tiecode.platform.compiler.toolchain.processor.AnnotationProvider;

import cn.tiecode.api.event.TiecodeCompilerEvent;

public class LombokCompilerEvent implements TiecodeCompilerEvent {
    @Override
    public void init(Context context) {

    }

    @Override
    public void onProvideAnnotation(AnnotationProvider provider) {
        provider.registerAnnotation(DataClassProcessor.DATA_CLASS, new DataClassProcessor());
        provider.registerAnnotation(HashObjectProcessor.HASH_OBJECT, new HashObjectProcessor());
        provider.registerAnnotation(SerializeClassProcessor.SERIALIZE_CLASS, new SerializeClassProcessor());
        provider.registerAnnotation(CleanUpProcessor.CLEAN_UP, new CleanUpProcessor());
        provider.registerAnnotation(ParameterNameProcessor.PARAM_NAME, new ParameterNameProcessor());
        provider.registerAnnotation(GenerateCreateProcessor.GENERATE_CREATE, new GenerateCreateProcessor());
        provider.registerAnnotation(ForceDependencyProcessor.FORCE_DEPENDENCY, new ForceDependencyProcessor());
        provider.registerAnnotation(SingleInstanceProcessor.SINGLE, new SingleInstanceProcessor());
        provider.registerAnnotation(ToMainPkgProcessor.TO_MAIN_PKG, new ToMainPkgProcessor());
        provider.registerAnnotation(CustomComponentProcessor.CUSTOM_COMPONENT, new CustomComponentProcessor());
    }

    @Override
    public void onEventStarted(TaskEvent taskEvent) {

    }

    @Override
    public void onEventFinished(TaskEvent taskEvent) {

    }
}
